<script setup lang="ts">
import {ref} from "vue";

const copyRef = ref<any>(null);

const copyContent = () => {
  copyRef.value.copyContent();
}
</script>

<template>
  <div>
    <dev-copy ref="copyRef">
      我要复制的就是这段话，我希望点击按钮的时候可以复制这段话！
    </dev-copy>
  </div>

  <el-button style="margin-top: 20px" @click="copyContent">复制上面的内容</el-button>

</template>
